package za.co.yellowfire.solarflare.annotation;

import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Marks the id of an entity as searchable
 * @author Mark P Ashworth
 * @version 0.0.1
 */
@Target({FIELD})
@Retention(RUNTIME)
@Documented
@Qualifier
public @interface SearchablePropertyId {
    /** The name of the property / field. If the default is used then the name is derived from the field / property name */
    String name() default SearchableDefaults.DEFAULT_NAME;
    
    /** The boost that should be applied */
    float boost() default SearchableDefaults.DEFAULT_BOOST;

    /** The separator to use between the @Searchable name and the property id.*/
    String separator() default SearchableDefaults.DEFAULT_SEPARATOR;
}
